<%@page import="shmged.com.shlcm.part.CmCreateReimbursementEntry"%>
<%@page import="org.json.JSONArray"%>
<%@page import="org.json.JSONObject"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="wt.httpgw.URLFactory,wt.query.QuerySpec,wt.fc.QueryResult,wt.fc.PersistenceHelper,wt.query.SearchCondition,wt.workflow.work.WorkItem,wt.fc.ReferenceFactory,java.util.*"%>
    <%@page import="wt.org.WTPrincipal"%>
    <%@page import="wt.fc.Persistable"%>
    <%@page import="wt.part.WTPart,wt.part.WTPartMaster"%>
<%
String baseUrl = new URLFactory().getBaseHREF();
String partOid=request.getParameter("partOid");
System.out.println("partNumber" + partOid);
ReferenceFactory refefrence = new ReferenceFactory();
Persistable persistable = refefrence.getReference(partOid).getObject();
WTPart part = (WTPart)persistable;

String result = "";
     try{
    	 result = CmCreateReimbursementEntry.queryReimbusementDetail(part);
     }catch(Exception e){
    	 e.toString();
    	 JSONObject retJson = new JSONObject();
    	 retJson.put("total", 0);
    	 retJson.put("rows", new JSONArray());
    	 result = retJson.toString();
    	 
     }
     out.println(result);
     out.flush();
%>